package com.alfred.mall.user.application.controller;

import com.alfred.mall.user.api.UserService;
import com.alfred.mall.user.api.bo.UserBO;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/users/user")
public class UserController {

    @Reference
    UserService userService;

    @RequestMapping("/info")
    public UserBO userInfo(@RequestParam("userId") Integer userId) {
        UserBO result = userService.getUserById(userId);

        return result;
    }
}
